%::PROVIDES=(
	name	=> ["PARTITIONED","UNPARTITIONED"],
	desc	=> ["Changes set of cldaemon connectivity to rest of cluster."],
	type	=> "request",
	code	=> \&::do_handle_partitioned
);

sub ::do_handle_partitioned {
my $args=shift;
my $cmdname=$args->{"_CMDNAME"};
my $action="wait";

	if(exists($xml->{global}->{on_partition}) &&
		lc($xml->{global}->{on_partition}) eq "die") {
		$action="die";
	}

	if($cmdname eq "PARTITIONED") {
		$::NODE_STATE="PARTITIONED";
		::logmsg("Action to perform - '$action'.");
		if($action eq "die") {
			if(-f "/sbin/cluster/tools/dusp" &&
			   -x "/sbin/cluster/tools/dusp") {
				system("/sbin/cluster/tools/dusp");
			}
			logwarn("Unable to force restart of local server -");
			logwarn("performing standard reboot instead.");
			system("/sbin/reboot");
		}
		return "OK";
	}
	# If we have forward set local status to partitioned.
	if(exists($args->{FORWARD})) {
		$::NODE_STATE="UP";
		do_it("UNPARTITIONED");
	} else {
		# Otherwise assume the OTHER node is OK
		$::OTHER_NODE_STATE="UP";
	}
	return "OK";
}
1;
